/*
用作将指定类型b隐式转换成类型a
场景：
template<class ... args_t>
auto function(args_t const & ... list){
    implicit<int &> seq[] = { list... };
    ...
}
*/
#ifndef xpack_dumb_implicit
#define xpack_dumb_implicit
#pragma push_macro("xuser")
#undef  xuser
#define xuser mixc::dumb_implicit::inc
#include"define/base_type.hpp"
#include"macro/xexport.hpp"
#include"macro/xstruct.hpp"
#pragma pop_macro("xuser")

namespace mixc::dumb_implicit{
    template<class type_t>
    xstruct(
        xtmpl(implicit, type_t),
        xprif(m_value, type_t)
    )
        template<class source_t>
        implicit(source_t const & value) : 
            m_value((type_t)(source_t &)value) {}

        operator type_t () const {
            return m_value;
        }

        auto operator -> () const {
            return & m_value;
        }
    $
}

#endif

xexport(mixc::dumb_implicit::implicit)